From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
-Date: Sat, 23 Oct 2021 19:17:07 +0200
+Date: Wed, 24 May 2023 23:55:51 +0200
Subject: Build against system libraries
---
- CMakeLists.txt | 38 +++++++++++++++++++++-----------------
- 1 file changed, 21 insertions(+), 17 deletions(-)
+ CMakeLists.txt | 44 +++++++++++++++++++++++++-------------------
+ libs/filamat/CMakeLists.txt | 2 +-
+ 2 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index aa51851..b82a941 100644
+index aa51851..960f49f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -573,12 +573,25 @@ function(get_resgen_vars ARCHIVE_DIR ARCHIVE_NAME)
+@@ -573,12 +573,30 @@ function(get_resgen_vars ARCHIVE_DIR ARCHIVE_NAME)
endif()
endfunction()
+# External dependencies
+# ==================================================================================================
+find_package(GTest REQUIRED)
++find_package(astcenc REQUIRED)
+find_package(tsl-robin-map REQUIRED)
+find_package(meshoptimizer REQUIRED)
+find_package(draco REQUIRED)
++set(THREADS_PREFER_PTHREAD_FLAG ON)
++find_package(Threads REQUIRED)
+if(IS_HOST_PLATFORM)
+ find_package(PNG REQUIRED)
+ find_package(SDL2 REQUIRED)
+ find_package(ZLIB REQUIRED)
+ find_package(tinyexr REQUIRED)
+endif()
++include(debian/cmake/imgui.cmake)
++include(debian/cmake/stb.cmake)
+
# ==================================================================================================
# Sub-projects
add_subdirectory(${LIBRARIES}/camutils)
add_subdirectory(${LIBRARIES}/filabridge)
add_subdirectory(${LIBRARIES}/filaflat)
-@@ -597,22 +610,17 @@ add_subdirectory(${FILAMENT}/filament)
+@@ -597,23 +615,16 @@ add_subdirectory(${FILAMENT}/filament)
add_subdirectory(${FILAMENT}/shaders)
add_subdirectory(${EXTERNAL}/civetweb/tnt)
add_subdirectory(${EXTERNAL}/hat-trie/tnt)
-add_subdirectory(${EXTERNAL}/imgui/tnt)
-add_subdirectory(${EXTERNAL}/robin-map/tnt)
-+include(debian/cmake/imgui.cmake)
add_subdirectory(${EXTERNAL}/smol-v/tnt)
-add_subdirectory(${EXTERNAL}/benchmark/tnt)
-add_subdirectory(${EXTERNAL}/meshoptimizer)
-add_subdirectory(${EXTERNAL}/jsmn/tnt)
-add_subdirectory(${EXTERNAL}/stb/tnt)
+include(debian/cmake/jsmn.cmake)
-+include(debian/cmake/stb.cmake)
add_subdirectory(${EXTERNAL}/getopt)
if (FILAMENT_BUILD_FILAMAT OR IS_HOST_PLATFORM)
- # spirv-tools_SOURCE_DIR variable.
- add_subdirectory(${EXTERNAL}/spirv-tools)
- add_subdirectory(${EXTERNAL}/glslang/tnt)
+- add_subdirectory(${EXTERNAL}/spirv-cross/tnt)
+ include(debian/cmake/spirv-tools.cmake)
+ include(debian/cmake/glslang.cmake)
- add_subdirectory(${EXTERNAL}/spirv-cross/tnt)
++ include(debian/cmake/spirv-cross.cmake)
add_subdirectory(${LIBRARIES}/filamat)
-@@ -651,11 +659,7 @@ if (IS_HOST_PLATFORM)
+ # the material debugger requires filamat
+@@ -649,13 +660,8 @@ if (IS_HOST_PLATFORM)
- add_subdirectory(${EXTERNAL}/astcenc/tnt)
+ add_subdirectory(${FILAMENT}/samples)
+
+- add_subdirectory(${EXTERNAL}/astcenc/tnt)
add_subdirectory(${EXTERNAL}/etc2comp)
- add_subdirectory(${EXTERNAL}/libassimp/tnt)
- add_subdirectory(${EXTERNAL}/libpng/tnt)
add_subdirectory(${TOOLS}/cmgen)
add_subdirectory(${TOOLS}/cso-lut)
+diff --git a/libs/filamat/CMakeLists.txt b/libs/filamat/CMakeLists.txt
+index 9645004..2271e83 100644
+--- a/libs/filamat/CMakeLists.txt
++++ b/libs/filamat/CMakeLists.txt
+@@ -104,7 +104,7 @@ if (APPLE OR MSVC)
+ target_link_libraries(${TARGET} glslang SPIRV SPVRemapper SPIRV-Tools-opt spirv-cross-glsl)
+ else()
+ target_link_libraries(${TARGET}
+- -Wl,--start-group glslang SPIRV SPVRemapper SPIRV-Tools-opt spirv-cross-glsl -Wl,--end-group)
++ -Wl,--start-group glslang SPIRV SPVRemapper SPIRV-Tools-opt spirv-cross -Wl,--end-group)
+ endif()
+
+ # ==================================================================================================
1 file changed, 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b82a941..b6cd7ab 100644
+index 960f49f..d379ff1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -651,10 +651,6 @@ if (IS_HOST_PLATFORM)
+@@ -654,10 +654,6 @@ if (IS_HOST_PLATFORM)
add_subdirectory(${LIBRARIES}/filamentapp)
add_subdirectory(${LIBRARIES}/imageio)
-
add_subdirectory(${FILAMENT}/samples)
- add_subdirectory(${EXTERNAL}/astcenc/tnt)
+ add_subdirectory(${EXTERNAL}/etc2comp)
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b6cd7ab..6786b22 100644
+index d379ff1..f637432 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -495,7 +495,12 @@ function(combine_static_libs TARGET OUTPUT DEPS)
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6786b22..8d674dc 100644
+index f637432..46ee62f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -475,11 +475,13 @@ function(list_licenses OUTPUT MODULES)
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8d674dc..ce4192c 100644
+index 46ee62f..f7eb993 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -331,12 +331,6 @@ endif()
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
-Date: Tue, 25 Jan 2022 22:04:07 +0100
+Date: Wed, 24 May 2023 22:47:17 +0200
Subject: Fix library export for Debian
---
- CMakeLists.txt | 24 ++++++++++--
+ CMakeLists.txt | 16 ++++++++
filament/CMakeLists.txt | 54 +++++++++++++++++++--------
filament/backend/CMakeLists.txt | 47 ++++++++++++++++--------
filament/benchmark/CMakeLists.txt | 3 +-
tools/mipgen/CMakeLists.txt | 2 +-
tools/normal-blending/CMakeLists.txt | 2 +-
tools/roughness-prefilter/CMakeLists.txt | 2 +-
- 34 files changed, 508 insertions(+), 249 deletions(-)
+ 34 files changed, 503 insertions(+), 246 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ce4192c..a95c557 100644
+index f7eb993..fa3099f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -577,15 +577,20 @@ endfunction()
- # External dependencies
- # ==================================================================================================
- find_package(GTest REQUIRED)
-+find_package(astcenc REQUIRED)
- find_package(tsl-robin-map REQUIRED)
- find_package(meshoptimizer REQUIRED)
- find_package(draco REQUIRED)
-+set(THREADS_PREFER_PTHREAD_FLAG ON)
-+find_package(Threads REQUIRED)
- if(IS_HOST_PLATFORM)
- find_package(PNG REQUIRED)
- find_package(SDL2 REQUIRED)
- find_package(ZLIB REQUIRED)
- find_package(tinyexr REQUIRED)
- endif()
-+include(debian/cmake/imgui.cmake)
-+include(debian/cmake/stb.cmake)
-
- # ==================================================================================================
- # Sub-projects
-@@ -610,12 +615,10 @@ add_subdirectory(${FILAMENT}/filament)
- add_subdirectory(${FILAMENT}/shaders)
- add_subdirectory(${EXTERNAL}/civetweb/tnt)
- add_subdirectory(${EXTERNAL}/hat-trie/tnt)
--include(debian/cmake/imgui.cmake)
- add_subdirectory(${EXTERNAL}/smol-v/tnt)
- include(debian/cmake/benchmark.cmake)
- add_subdirectory(${EXTERNAL}/cgltf/tnt)
- include(debian/cmake/jsmn.cmake)
--include(debian/cmake/stb.cmake)
- add_subdirectory(${EXTERNAL}/getopt)
-
- if (FILAMENT_BUILD_FILAMAT OR IS_HOST_PLATFORM)
-@@ -653,7 +656,6 @@ if (IS_HOST_PLATFORM)
-
- add_subdirectory(${FILAMENT}/samples)
-
-- add_subdirectory(${EXTERNAL}/astcenc/tnt)
- add_subdirectory(${EXTERNAL}/etc2comp)
- include(debian/cmake/libassimp.cmake)
-
-@@ -674,3 +676,19 @@ endif()
+@@ -676,3 +676,19 @@ endif()
if (NOT CMAKE_CROSSCOMPILING)
export(TARGETS matc cmgen filamesh mipgen resgen glslminifier FILE ${IMPORT_EXECUTABLES})
endif()
# ==================================================================================================
# Compiler flags
diff --git a/libs/filamat/CMakeLists.txt b/libs/filamat/CMakeLists.txt
-index 9645004..a130f0c 100644
+index 2271e83..9b38857 100644
--- a/libs/filamat/CMakeLists.txt
+++ b/libs/filamat/CMakeLists.txt
@@ -84,18 +84,36 @@ include_directories(${PUBLIC_HDR_DIR})
else()
- target_link_libraries(${TARGET}
+ target_link_libraries(${TARGET} PRIVATE
- -Wl,--start-group glslang SPIRV SPVRemapper SPIRV-Tools-opt spirv-cross-glsl -Wl,--end-group)
+ -Wl,--start-group glslang SPIRV SPVRemapper SPIRV-Tools-opt spirv-cross -Wl,--end-group)
endif()
@@ -151,14 +169,14 @@ set(FILAMAT_DEPS
9 files changed, 36 insertions(+), 151 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a95c557..5c117c3 100644
+index fa3099f..632ece6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -650,7 +650,6 @@ if (WEBGL)
--- /dev/null
+From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
+Date: Mon, 7 Feb 2022 10:12:08 +0100
+Subject: Define M_PIf only if it is not already defined in math.h
+
+---
+ libs/image/src/ImageSampler.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libs/image/src/ImageSampler.cpp b/libs/image/src/ImageSampler.cpp
+index 00385e9..53c68e8 100644
+--- a/libs/image/src/ImageSampler.cpp
++++ b/libs/image/src/ImageSampler.cpp
+@@ -38,7 +38,9 @@ struct FilterFunction {
+ bool rejectExternalSamples = true;
+ };
+
++#ifndef M_PIf
+ constexpr float M_PIf = float(filament::math::F_PI);
++#endif
+
+ const FilterFunction Box {
+ .fn = [](float t) { return t <= 0.5f ? 1.0f : 0.0f; },
+++ /dev/null
-From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
-Date: Thu, 27 Jan 2022 19:50:26 +0100
-Subject: Use system spirv-cross
-
----
- CMakeLists.txt | 2 +-
- libs/filamat/CMakeLists.txt | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 5c117c3..632ece6 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -624,7 +624,7 @@ add_subdirectory(${EXTERNAL}/getopt)
- if (FILAMENT_BUILD_FILAMAT OR IS_HOST_PLATFORM)
- include(debian/cmake/spirv-tools.cmake)
- include(debian/cmake/glslang.cmake)
-- add_subdirectory(${EXTERNAL}/spirv-cross/tnt)
-+ include(debian/cmake/spirv-cross.cmake)
- add_subdirectory(${LIBRARIES}/filamat)
-
- # the material debugger requires filamat
-diff --git a/libs/filamat/CMakeLists.txt b/libs/filamat/CMakeLists.txt
-index a130f0c..9b38857 100644
---- a/libs/filamat/CMakeLists.txt
-+++ b/libs/filamat/CMakeLists.txt
-@@ -122,7 +122,7 @@ if (APPLE OR MSVC)
- target_link_libraries(${TARGET} glslang SPIRV SPVRemapper SPIRV-Tools-opt spirv-cross-glsl)
- else()
- target_link_libraries(${TARGET} PRIVATE
-- -Wl,--start-group glslang SPIRV SPVRemapper SPIRV-Tools-opt spirv-cross-glsl -Wl,--end-group)
-+ -Wl,--start-group glslang SPIRV SPVRemapper SPIRV-Tools-opt spirv-cross -Wl,--end-group)
- endif()
-
- # ==================================================================================================
--- /dev/null
+From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
+Date: Mon, 7 Feb 2022 10:30:35 +0100
+Subject: Avoid mips as identifier because it fails on mips* arch
+
+---
+ libs/image/src/ImageSampler.cpp | 6 +++---
+ libs/image/tests/test_image.cpp | 12 ++++++------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/libs/image/src/ImageSampler.cpp b/libs/image/src/ImageSampler.cpp
+index 53c68e8..80ae4b7 100644
+--- a/libs/image/src/ImageSampler.cpp
++++ b/libs/image/src/ImageSampler.cpp
+@@ -339,11 +339,11 @@ void computeSingleSample(const LinearImage& source, float x, float y, SingleSamp
+
+ // Unlike traditional mipmap generation, our implementation generates all levels from the original
+ // image, under the premise that this produces a higher quality result.
+-void generateMipmaps(const LinearImage& source, Filter filter, LinearImage* result, uint32_t mips) {
+- mips = std::min(mips, getMipmapCount(source));
++void generateMipmaps(const LinearImage& source, Filter filter, LinearImage* result, uint32_t mipCount) {
++ mipCount = std::min(mipCount, getMipmapCount(source));
+ uint32_t width = source.getWidth();
+ uint32_t height = source.getHeight();
+- for (uint32_t n = 0; n < mips; ++n) {
++ for (uint32_t n = 0; n < mipCount; ++n) {
+ width = std::max(width >> 1u, 1u);
+ height = std::max(height >> 1u, 1u);
+ result[n] = resampleImage(source, width, height, filter);
+diff --git a/libs/image/tests/test_image.cpp b/libs/image/tests/test_image.cpp
+index 963515a..7ceb323 100644
+--- a/libs/image/tests/test_image.cpp
++++ b/libs/image/tests/test_image.cpp
+@@ -342,11 +342,11 @@ TEST_F(ImageTest, Mipmaps) { // NOLINT
+ "44444 41014 40704 41014 44444 44444 41014 40704 41014 44444");
+ uint32_t count = getMipmapCount(src);
+ ASSERT_EQ(count, 3);
+- vector<LinearImage> mips(count);
+- generateMipmaps(src, filter, mips.data(), count);
++ vector<LinearImage> mipmaps(count);
++ generateMipmaps(src, filter, mipmaps.data(), count);
+ updateOrCompare(src, "mip0_5x10.png");
+ for (uint32_t index = 0; index < count; ++index) {
+- updateOrCompare(mips[index], "mip" + std::to_string(index + 1) + "_5x10.png");
++ updateOrCompare(mipmaps[index], "mip" + std::to_string(index + 1) + "_5x10.png");
+ }
+
+ // Test color space with a classic RED => GREEN color gradient.
+@@ -354,11 +354,11 @@ TEST_F(ImageTest, Mipmaps) { // NOLINT
+ src = resampleImage(src, 200, 100, Filter::NEAREST);
+ count = getMipmapCount(src);
+ ASSERT_EQ(count, 7);
+- mips.resize(count);
+- generateMipmaps(src, filter, mips.data(), count);
++ mipmaps.resize(count);
++ generateMipmaps(src, filter, mipmaps.data(), count);
+ updateOrCompare(src, "mip0_200x100.png");
+ for (uint32_t index = 0; index < count; ++index) {
+- updateOrCompare(mips[index], "mip" + std::to_string(index + 1) + "_200x100.png");
++ updateOrCompare(mipmaps[index], "mip" + std::to_string(index + 1) + "_200x100.png");
+ }
+ }
+
+++ /dev/null
-From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
-Date: Mon, 7 Feb 2022 10:12:08 +0100
-Subject: Define M_PIf only if it is not already defined in math.h
-
----
- libs/image/src/ImageSampler.cpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libs/image/src/ImageSampler.cpp b/libs/image/src/ImageSampler.cpp
-index 00385e9..53c68e8 100644
---- a/libs/image/src/ImageSampler.cpp
-+++ b/libs/image/src/ImageSampler.cpp
-@@ -38,7 +38,9 @@ struct FilterFunction {
- bool rejectExternalSamples = true;
- };
-
-+#ifndef M_PIf
- constexpr float M_PIf = float(filament::math::F_PI);
-+#endif
-
- const FilterFunction Box {
- .fn = [](float t) { return t <= 0.5f ? 1.0f : 0.0f; },
+++ /dev/null
-From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
-Date: Mon, 7 Feb 2022 10:30:35 +0100
-Subject: Avoid mips as identifier because it fails on mips* arch
-
----
- libs/image/src/ImageSampler.cpp | 6 +++---
- libs/image/tests/test_image.cpp | 12 ++++++------
- 2 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/libs/image/src/ImageSampler.cpp b/libs/image/src/ImageSampler.cpp
-index 53c68e8..80ae4b7 100644
---- a/libs/image/src/ImageSampler.cpp
-+++ b/libs/image/src/ImageSampler.cpp
-@@ -339,11 +339,11 @@ void computeSingleSample(const LinearImage& source, float x, float y, SingleSamp
-
- // Unlike traditional mipmap generation, our implementation generates all levels from the original
- // image, under the premise that this produces a higher quality result.
--void generateMipmaps(const LinearImage& source, Filter filter, LinearImage* result, uint32_t mips) {
-- mips = std::min(mips, getMipmapCount(source));
-+void generateMipmaps(const LinearImage& source, Filter filter, LinearImage* result, uint32_t mipCount) {
-+ mipCount = std::min(mipCount, getMipmapCount(source));
- uint32_t width = source.getWidth();
- uint32_t height = source.getHeight();
-- for (uint32_t n = 0; n < mips; ++n) {
-+ for (uint32_t n = 0; n < mipCount; ++n) {
- width = std::max(width >> 1u, 1u);
- height = std::max(height >> 1u, 1u);
- result[n] = resampleImage(source, width, height, filter);
-diff --git a/libs/image/tests/test_image.cpp b/libs/image/tests/test_image.cpp
-index 963515a..7ceb323 100644
---- a/libs/image/tests/test_image.cpp
-+++ b/libs/image/tests/test_image.cpp
-@@ -342,11 +342,11 @@ TEST_F(ImageTest, Mipmaps) { // NOLINT
- "44444 41014 40704 41014 44444 44444 41014 40704 41014 44444");
- uint32_t count = getMipmapCount(src);
- ASSERT_EQ(count, 3);
-- vector<LinearImage> mips(count);
-- generateMipmaps(src, filter, mips.data(), count);
-+ vector<LinearImage> mipmaps(count);
-+ generateMipmaps(src, filter, mipmaps.data(), count);
- updateOrCompare(src, "mip0_5x10.png");
- for (uint32_t index = 0; index < count; ++index) {
-- updateOrCompare(mips[index], "mip" + std::to_string(index + 1) + "_5x10.png");
-+ updateOrCompare(mipmaps[index], "mip" + std::to_string(index + 1) + "_5x10.png");
- }
-
- // Test color space with a classic RED => GREEN color gradient.
-@@ -354,11 +354,11 @@ TEST_F(ImageTest, Mipmaps) { // NOLINT
- src = resampleImage(src, 200, 100, Filter::NEAREST);
- count = getMipmapCount(src);
- ASSERT_EQ(count, 7);
-- mips.resize(count);
-- generateMipmaps(src, filter, mips.data(), count);
-+ mipmaps.resize(count);
-+ generateMipmaps(src, filter, mipmaps.data(), count);
- updateOrCompare(src, "mip0_200x100.png");
- for (uint32_t index = 0; index < count; ++index) {
-- updateOrCompare(mips[index], "mip" + std::to_string(index + 1) + "_200x100.png");
-+ updateOrCompare(mipmaps[index], "mip" + std::to_string(index + 1) + "_200x100.png");
- }
- }
-
--- /dev/null
+From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
+Date: Sun, 13 Feb 2022 00:58:20 +0100
+Subject: Ensure proper alignment of resgen _OFFSET and _SIZE variables
+
+---
+ tools/resgen/src/main.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tools/resgen/src/main.cpp b/tools/resgen/src/main.cpp
+index e126b34..083e7d6 100644
+--- a/tools/resgen/src/main.cpp
++++ b/tools/resgen/src/main.cpp
+@@ -312,6 +312,7 @@ int main(int argc, char* argv[]) {
+ << " extern int " << prname << "_SIZE;\n";
+
+ dataAsmStream
++ << " .balign 8\n"
+ << prname << "_OFFSET:\n"
+ << " .int " << offset << "\n"
+ << prname << "_SIZE:\n"
+++ /dev/null
-From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
-Date: Sun, 13 Feb 2022 00:58:20 +0100
-Subject: Ensure proper alignment of resgen _OFFSET and _SIZE variables
-
----
- tools/resgen/src/main.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tools/resgen/src/main.cpp b/tools/resgen/src/main.cpp
-index e126b34..083e7d6 100644
---- a/tools/resgen/src/main.cpp
-+++ b/tools/resgen/src/main.cpp
-@@ -312,6 +312,7 @@ int main(int argc, char* argv[]) {
- << " extern int " << prname << "_SIZE;\n";
-
- dataAsmStream
-+ << " .balign 8\n"
- << prname << "_OFFSET:\n"
- << " .int " << offset << "\n"
- << prname << "_SIZE:\n"
--- /dev/null
+From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
+Date: Thu, 16 Jun 2022 18:46:44 +0200
+Subject: Fix FTBFS with GCC-12
+
+---
+ libs/utils/src/Profiler.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libs/utils/src/Profiler.cpp b/libs/utils/src/Profiler.cpp
+index 75caf87..61513b8 100644
+--- a/libs/utils/src/Profiler.cpp
++++ b/libs/utils/src/Profiler.cpp
+@@ -27,6 +27,7 @@
+ #endif
+
+ #include <algorithm>
++#include <iterator>
+ #include <memory>
+
+ #if defined(__linux__)
+++ /dev/null
-From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
-Date: Thu, 16 Jun 2022 18:46:44 +0200
-Subject: Fix FTBFS with GCC-12
-
----
- libs/utils/src/Profiler.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libs/utils/src/Profiler.cpp b/libs/utils/src/Profiler.cpp
-index 75caf87..61513b8 100644
---- a/libs/utils/src/Profiler.cpp
-+++ b/libs/utils/src/Profiler.cpp
-@@ -27,6 +27,7 @@
- #endif
-
- #include <algorithm>
-+#include <iterator>
- #include <memory>
-
- #if defined(__linux__)
--- /dev/null
+From: Adrian Bunk <bunk@debian.org>
+Date: Mon, 18 Jul 2022 02:27:16 +0300
+Subject: Workaround for armel clang compiler bug
+
+---
+ libs/utils/include/utils/compiler.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/utils/include/utils/compiler.h b/libs/utils/include/utils/compiler.h
+index c0bdebf..ea63dbd 100644
+--- a/libs/utils/include/utils/compiler.h
++++ b/libs/utils/include/utils/compiler.h
+@@ -176,7 +176,7 @@
+ # define UTILS_HAS_RTTI 0
+ #endif
+
+-#ifdef __ARM_ACLE
++#if defined(__ARM_ACLE) && (__ARM_ARCH >= 7)
+ # include <arm_acle.h>
+ # define UTILS_WAIT_FOR_INTERRUPT() __wfi()
+ # define UTILS_WAIT_FOR_EVENT() __wfe()
--- /dev/null
+From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
+Date: Sat, 12 Nov 2022 13:26:20 +0100
+Subject: Fix TBuiltInResource struct
+
+---
+ filament/backend/test/builtinResource.h | 9 +++++++++
+ libs/filamat/src/sca/builtinResource.h | 9 +++++++++
+ 2 files changed, 18 insertions(+)
+
+diff --git a/filament/backend/test/builtinResource.h b/filament/backend/test/builtinResource.h
+index 39ac194..78397fe 100644
+--- a/filament/backend/test/builtinResource.h
++++ b/filament/backend/test/builtinResource.h
+@@ -107,6 +107,15 @@ const TBuiltInResource DefaultTBuiltInResource = {
+ /* .maxTaskWorkGroupSizeY_NV = */ 1,
+ /* .maxTaskWorkGroupSizeZ_NV = */ 1,
+ /* .maxMeshViewCountNV = */ 4,
++ /* .maxMeshOutputVerticesEXT = */ 256,
++ /* .maxMeshOutputPrimitivesEXT = */ 256,
++ /* .maxMeshWorkGroupSizeX_EXT = */ 128,
++ /* .maxMeshWorkGroupSizeY_EXT = */ 128,
++ /* .maxMeshWorkGroupSizeZ_EXT = */ 128,
++ /* .maxTaskWorkGroupSizeX_EXT = */ 128,
++ /* .maxTaskWorkGroupSizeY_EXT = */ 128,
++ /* .maxTaskWorkGroupSizeZ_EXT = */ 128,
++ /* .maxMeshViewCountEXT = */ 4,
+ /* .maxDualSourceDrawBuffersEXT = */ 1,
+
+ /* .limits = */ {
+diff --git a/libs/filamat/src/sca/builtinResource.h b/libs/filamat/src/sca/builtinResource.h
+index 4419eb6..c47c8e0 100644
+--- a/libs/filamat/src/sca/builtinResource.h
++++ b/libs/filamat/src/sca/builtinResource.h
+@@ -107,6 +107,15 @@ const TBuiltInResource DefaultTBuiltInResource = {
+ /* .maxTaskWorkGroupSizeY_NV = */ 1,
+ /* .maxTaskWorkGroupSizeZ_NV = */ 1,
+ /* .maxMeshViewCountNV = */ 4,
++ /* .maxMeshOutputVerticesEXT = */ 256,
++ /* .maxMeshOutputPrimitivesEXT = */ 256,
++ /* .maxMeshWorkGroupSizeX_EXT = */ 128,
++ /* .maxMeshWorkGroupSizeY_EXT = */ 128,
++ /* .maxMeshWorkGroupSizeZ_EXT = */ 128,
++ /* .maxTaskWorkGroupSizeX_EXT = */ 128,
++ /* .maxTaskWorkGroupSizeY_EXT = */ 128,
++ /* .maxTaskWorkGroupSizeZ_EXT = */ 128,
++ /* .maxMeshViewCountEXT = */ 4,
+ /* .maxDualSourceDrawBuffersEXT = */ 1,
+
+ /* .limits = */ {
+++ /dev/null
-From: Adrian Bunk <bunk@debian.org>
-Date: Mon, 18 Jul 2022 02:27:16 +0300
-Subject: Workaround for armel clang compiler bug
-
----
- libs/utils/include/utils/compiler.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libs/utils/include/utils/compiler.h b/libs/utils/include/utils/compiler.h
-index c0bdebf..ea63dbd 100644
---- a/libs/utils/include/utils/compiler.h
-+++ b/libs/utils/include/utils/compiler.h
-@@ -176,7 +176,7 @@
- # define UTILS_HAS_RTTI 0
- #endif
-
--#ifdef __ARM_ACLE
-+#if defined(__ARM_ACLE) && (__ARM_ARCH >= 7)
- # include <arm_acle.h>
- # define UTILS_WAIT_FOR_INTERRUPT() __wfi()
- # define UTILS_WAIT_FOR_EVENT() __wfe()
+++ /dev/null
-From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
-Date: Sat, 12 Nov 2022 13:26:20 +0100
-Subject: Fix TBuiltInResource struct
-
----
- filament/backend/test/builtinResource.h | 9 +++++++++
- libs/filamat/src/sca/builtinResource.h | 9 +++++++++
- 2 files changed, 18 insertions(+)
-
-diff --git a/filament/backend/test/builtinResource.h b/filament/backend/test/builtinResource.h
-index 39ac194..78397fe 100644
---- a/filament/backend/test/builtinResource.h
-+++ b/filament/backend/test/builtinResource.h
-@@ -107,6 +107,15 @@ const TBuiltInResource DefaultTBuiltInResource = {
- /* .maxTaskWorkGroupSizeY_NV = */ 1,
- /* .maxTaskWorkGroupSizeZ_NV = */ 1,
- /* .maxMeshViewCountNV = */ 4,
-+ /* .maxMeshOutputVerticesEXT = */ 256,
-+ /* .maxMeshOutputPrimitivesEXT = */ 256,
-+ /* .maxMeshWorkGroupSizeX_EXT = */ 128,
-+ /* .maxMeshWorkGroupSizeY_EXT = */ 128,
-+ /* .maxMeshWorkGroupSizeZ_EXT = */ 128,
-+ /* .maxTaskWorkGroupSizeX_EXT = */ 128,
-+ /* .maxTaskWorkGroupSizeY_EXT = */ 128,
-+ /* .maxTaskWorkGroupSizeZ_EXT = */ 128,
-+ /* .maxMeshViewCountEXT = */ 4,
- /* .maxDualSourceDrawBuffersEXT = */ 1,
-
- /* .limits = */ {
-diff --git a/libs/filamat/src/sca/builtinResource.h b/libs/filamat/src/sca/builtinResource.h
-index 4419eb6..c47c8e0 100644
---- a/libs/filamat/src/sca/builtinResource.h
-+++ b/libs/filamat/src/sca/builtinResource.h
-@@ -107,6 +107,15 @@ const TBuiltInResource DefaultTBuiltInResource = {
- /* .maxTaskWorkGroupSizeY_NV = */ 1,
- /* .maxTaskWorkGroupSizeZ_NV = */ 1,
- /* .maxMeshViewCountNV = */ 4,
-+ /* .maxMeshOutputVerticesEXT = */ 256,
-+ /* .maxMeshOutputPrimitivesEXT = */ 256,
-+ /* .maxMeshWorkGroupSizeX_EXT = */ 128,
-+ /* .maxMeshWorkGroupSizeY_EXT = */ 128,
-+ /* .maxMeshWorkGroupSizeZ_EXT = */ 128,
-+ /* .maxTaskWorkGroupSizeX_EXT = */ 128,
-+ /* .maxTaskWorkGroupSizeY_EXT = */ 128,
-+ /* .maxTaskWorkGroupSizeZ_EXT = */ 128,
-+ /* .maxMeshViewCountEXT = */ 4,
- /* .maxDualSourceDrawBuffersEXT = */ 1,
-
- /* .limits = */ {
--- /dev/null
+From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
+Date: Sat, 28 Jan 2023 00:24:04 +0100
+Subject: Fix compatibility with spirv-cross SDK 1.3.236
+
+---
+ libs/filamat/src/GLSLPostProcessor.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libs/filamat/src/GLSLPostProcessor.cpp b/libs/filamat/src/GLSLPostProcessor.cpp
+index 678f069..c774bd9 100644
+--- a/libs/filamat/src/GLSLPostProcessor.cpp
++++ b/libs/filamat/src/GLSLPostProcessor.cpp
+@@ -346,7 +346,11 @@ void GLSLPostProcessor::fullOptimization(const TShader& tShader,
+
+ if (tShader.getStage() == EShLangFragment && glslOptions.es) {
+ for (auto i : config.glsl.subpassInputToColorLocation) {
++#if SPV_VERSION >= 0x10600
++ glslCompiler.remap_ext_framebuffer_fetch(i.first, i.second, true);
++#else
+ glslCompiler.remap_ext_framebuffer_fetch(i.first, i.second);
++#endif
+ }
+ }
+
+++ /dev/null
-From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
-Date: Sat, 28 Jan 2023 00:24:04 +0100
-Subject: Fix compatibility with spirv-cross SDK 1.3.236
-
----
- libs/filamat/src/GLSLPostProcessor.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libs/filamat/src/GLSLPostProcessor.cpp b/libs/filamat/src/GLSLPostProcessor.cpp
-index 678f069..c774bd9 100644
---- a/libs/filamat/src/GLSLPostProcessor.cpp
-+++ b/libs/filamat/src/GLSLPostProcessor.cpp
-@@ -346,7 +346,11 @@ void GLSLPostProcessor::fullOptimization(const TShader& tShader,
-
- if (tShader.getStage() == EShLangFragment && glslOptions.es) {
- for (auto i : config.glsl.subpassInputToColorLocation) {
-+#if SPV_VERSION >= 0x10600
-+ glslCompiler.remap_ext_framebuffer_fetch(i.first, i.second, true);
-+#else
- glslCompiler.remap_ext_framebuffer_fetch(i.first, i.second);
-+#endif
- }
- }
-
0009-Fix-library-export-for-Debian.patch
0010-Rename-resgen-executable-to-avoid-conflict-with-mono.patch
0011-Replace-BlueGL-with-epoxy.patch
-0012-Use-system-spirv-cross.patch
-0013-Define-M_PIf-only-if-it-is-not-already-defined-in-ma.patch
-0014-Avoid-mips-as-identifier-because-it-fails-on-mips-ar.patch
-0015-Ensure-proper-alignment-of-resgen-_OFFSET-and-_SIZE-.patch
-0016-Fix-FTBFS-with-GCC-12.patch
-0017-Workaround-for-armel-clang-compiler-bug.patch
-0018-Fix-TBuiltInResource-struct.patch
-0019-Fix-compatibility-with-spirv-cross-SDK-1.3.236.patch
+0012-Define-M_PIf-only-if-it-is-not-already-defined-in-ma.patch
+0013-Avoid-mips-as-identifier-because-it-fails-on-mips-ar.patch
+0014-Ensure-proper-alignment-of-resgen-_OFFSET-and-_SIZE-.patch
+0015-Fix-FTBFS-with-GCC-12.patch
+0016-Workaround-for-armel-clang-compiler-bug.patch
+0017-Fix-TBuiltInResource-struct.patch
+0018-Fix-compatibility-with-spirv-cross-SDK-1.3.236.patch